package boerse.CommandProcessor;

import java.lang.reflect.Method;

public class CommandType implements CommandTypeInfo {

	private Method method;
	private String name;
	private String helpText;
	private Object target;
	private Class<?>[] paramTypes;
	private String cmdAbbreviation;
	
	
	
	public CommandType(Method method, Object target, String helpText, String cmdAbbreviation) {
		super();
		this.method = method;
		this.name = method.getName();
		this.target = target;		
		this.paramTypes = method.getParameterTypes();
		this.helpText = helpText;
		this.cmdAbbreviation = cmdAbbreviation;
	}

	@Override
	public String getName() {
		return name;
	}

	@Override
	public String getHelpText() {
		return helpText;
	}

	@Override
	public Class<?>[] getParamTypes() {
		return paramTypes;
	}

	@Override
	public Method getMethodName() {
		return method;
	}

	@Override
	public Object getTarget() {
		return target;
	}
	
	@Override
	public String getCmdAbbreviation() {
		return cmdAbbreviation;
	}
	
}
